home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
3D World 111
/
3DW_111.iso
/
pc
/
Menu
/
Scenes
/
home.dir
/
00044_Script_Media Controls
< prev
next >
Wrap
Text File
|
2008-09-12
|
2KB
|
114 lines
---Media Controls
global gRootPath
global gDiv
global mp3List
global selecta
on stopmovie
repeat with i = 1 to the number of members of castlib(5)
member(i, 5).erase()
end repeat
--member("stub_image_holder").erase()
end
on InitMediaPlayer
repeat with i = 1 to the number of members of castlib(5)
member(i, 5).erase()
end repeat
mp3List = []
thePath = gRootPath & "DiscContent" & gDiv & "Resources" & gDiv & "PodCasts" & gDiv
u = getnetText(thePath & "playlist.txt")
if netDone(u) then
c = netTextResult(u)
end if
iCount = 1
repeat with i = 1 to c.line.count
mp3List[iCount] = [:]
mp3List[iCount][#pTitle] = c.line[i]
i=i+1
o = new(#Sound, castlib(5))
o.filename = thePath & c.line[i]
mp3List[iCount][#pFilename] = o
iCount = iCount + 1
end repeat
selecta = 1
put mp3List[1].pFilename
sound(2).queue(mp3List[1].pFilename)
member("tickertape").text = "Click the 'play' button to begin playing the podcasts"
put "MP3 Player Done"
end
on PlayMedia
Sound(2).play()
member("tickertape").text = mp3List[selecta].pTitle
end
on PauseMedia
Sound(2).pause()
end
on NextMedia
selecta = selecta + 1
if selecta > mp3List.count then
selecta = 1
end if
sound(2).stop()
sound(2).queue(mp3List[selecta].pFilename)
member("tickertape").text = mp3List[selecta].pTitle
sound(2).play()
end
on PrevMedia
selecta = selecta - 1
if selecta < 1 then
selecta = mp3List.count
end if
sound(2).stop()
sound(2).queue(mp3List[selecta].pFilename)
member("tickertape").text = mp3List[selecta].pTitle
sound(2).play()
end
on StopMedia
sound(2).stop()
end